<html>
    <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head>
    <link rel="stylesheet" type="text/css" href="../css/style.css">
        <body id="body">
        <div id="header">  
        </div>

        <div id="menu">
            <ul id="a">
                <li><a href="#">Home</a></li>
                <li><a href="#">Home</a></li>
                <li><a href="#">Home</a></li>
                <li><a href="#">Home</a></li>
                <li><a href="#">Home</a></li>
                <li><a href="#">Home</a></li>
              
            </ul>

        </div>
            //co gang len nhe, 
        <div id="page_body">  
        <h1 align="center"> Design</h1>
<?php
        require_once '../model/db.php';
        $keyword = new db();
        $list = $keyword->works();
        ?>
         <table border="1px">
                <?php
                $page = 10;
                if (!isset($_GET['page'])) {
                    $pages = 0;
                } else {
                    $pages = (int) $_GET['page'];
                }
                $data = mysql_num_rows(mysql_query("SELECT * FROM works ")) or die(mysql_error());
                $sumpage = 15;
                $pager = $page * $page;
                $result = mysql_query("SELECT * FROM works LIMIT {$pager},{$page} ") or die(mysql_error());
                $max = $sumpage;
                $a = 5;?>
                    <?php
                while ($info = mysql_fetch_array($result)) {
                    echo $info['id'] . " ";
                    echo $info['name'] . " ";
                    echo "<br>";
                }

                echo "<a href='index.php?page=1'> Frist </a>";
                for ($page = 1; $page <= $sumpage; $page++) {

                    echo "<a href='index.php?page={$page}'> [{$page}]</a>";
                }
                echo "<a href='index.php?page={$max}'> Last </a>";
                ?>
            </table>
                
       
            </body>
        </html> 



































